/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@import '../../../variables';

.helper-query {
  position: relative;
  @include card-like;

  .query-top-bar {
    position: relative;
    height: 36px;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;

    .corner {
      position: absolute;
      top: 50%;
      right: 3px;
      transform: translate(0, -50%);
      @include card-background;
    }
  }

  .flexible-query-input {
    border-top: 1px solid rgba($dark-gray1, 0.5);
    border-bottom: 1px solid rgba($dark-gray1, 0.5);
  }

  .query-control-bar {
    position: relative;
    width: 100%;
    height: 30px;
    display: flex;
    gap: 10px;
    align-items: center;

    .execution-timer-panel,
    .execution-summary-panel {
      position: absolute;
      top: 0;
      right: 0;
    }
  }

  .init-pane {
    text-align: center;
    flex: 1;
    border-top: 1px solid rgba($dark-gray1, 0.5);

    p {
      position: relative;
      top: 38%;
      font-size: 15px;
    }
  }

  .output-pane {
    overflow: hidden;
    position: relative;
    height: 254px;
    border-top: 1px solid rgba($dark-gray1, 0.5);

    > * {
      position: absolute;
      width: 100%;
      height: 100%;
    }

    .error-container {
      position: relative;

      .execution-error-pane {
        position: absolute;
        top: 5px;
        left: 5px;
        right: 5px;
        height: 150px;
        width: auto;
      }
    }
  }
}
